package com.edu.demo.service.impl;

import com.edu.demo.entity.SysUser;
import com.edu.demo.mapper.SysUserMapper;
import com.edu.demo.mapper.UserRoleMapper;
import com.edu.demo.pojo.UserRole;
import com.edu.demo.service.ISysUserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.edu.demo.service.UserRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author jixuewei
 * @since 2023-01-12
 */
@Service
public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> implements ISysUserService {

    @Autowired
    private SysUserMapper sysUserMapper;

    @Autowired
    private UserRoleService userRoleService;

    @Override
    public int insertUserRole(List<UserRole> list) {
       userRoleService.saveBatch(list);
        return 0;
    }
}
